package com.example.springbootes.entity;

import lombok.experimental.Tolerate;
import org.springframework.data.elasticsearch.annotations.Document;

/**
 * @author lisg
 * @description
 * @createTime 2022/3/3
 */
@Document(indexName = "book",type = "test")
public class Book {
    /**
     * 主键ID
     */
    private Long id;
    /**
     * 作者
     */
    private String author;
    /**
     * 书名
     */
    private String title;

    @Tolerate
    public Book(){}

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @Override
    public String toString() {
        return "Book{" +
                "id=" + id +
                ", author='" + author + '\'' +
                ", title='" + title + '\'' +
                '}';
    }
}
